using System.Drawing;

namespace _3Dto2D.Models;

public class FrameData
{
    public int Index { get; set; }
    public Bitmap? Image { get; set; }
    public short OffsetX { get; set; }
    public short OffsetY { get; set; }
    public TransformData Transform { get; set; } = new();
    public MeshData? Mesh { get; set; }
    public Bitmap? HandImage { get; set; }
    public short HandOffsetX { get; set; }
    public short HandOffsetY { get; set; }
}

public class TransformData
{
    public float RotationX { get; set; }
    public float RotationY { get; set; }
    public float RotationZ { get; set; }
    public float MoveX { get; set; }
    public float MoveY { get; set; }
    public float MoveZ { get; set; }
    public float Scale { get; set; } = 1.0f;
}

public class MeshData
{
    public string FilePath { get; set; } = string.Empty;
    public byte[]? VertexData { get; set; }
    public byte[]? IndexData { get; set; }
    public MaterialData[]? Materials { get; set; }
    public bool IsLoaded { get; set; }
}

public class MaterialData
{
    public string Name { get; set; } = string.Empty;
    public Color DiffuseColor { get; set; } = Color.White;
    public Color AmbientColor { get; set; } = Color.Gray;
    public string? TexturePath { get; set; }
    public byte[]? TextureData { get; set; }
}

public class LibraryData
{
    public string FilePath { get; set; } = string.Empty;
    public List<FrameData> Frames { get; set; } = new();
    public bool IsReference { get; set; }
    public int Version { get; set; } = 2;
    public DateTime LastModified { get; set; } = DateTime.Now;
}
